In the field of image encoding techniques of recent years, an in-screen prediction technique (i.e., intra prediction technique) that a spatial correlation that images have is utilized to increase a compression rate thereof has been adopted. According to the intra prediction technique, a predictive image of an encode-target block 101 is created using predicted pixels 102 of reference blocks 103-106, as shown in FIG. 11. Incidentally, a “block” represents a set of pixels, i.e., a macroblock, and as its size is used e.g., 4×4, 8×8 or 16×16.
In such image creation, predicted pixels 102 are copied in defined directions of prediction (prediction modes), whereby a predictive image is produced. According to H.264/AVC standard, prediction modes as shown in FIG. 12 are used. The total number of prediction modes and mode numbers vary depending on the block size. For example, with brightness signals, nine kinds of intra 4×4 prediction modes, nine kinds of intra 8×8 prediction modes and four kinds of intra 16×16 prediction modes are defined. In addition, as to color-difference signals, four kinds of intra prediction modes are defined. A predictive image of an encode-target block is created according to prediction modes decided by taking into account the block size. Then, one mode which achieves the minimum value of encoding cost (the smallest prediction error) is selected, and an encode is performed.
Encode standards of recent years, typified by H.264/AVC, require high calculation costs. Therefore, in performing an encoding process by means of hardware, arrangements to shorten the processing time by pipeline processing are made in general. For example, as shown in FIG. 13, an encoding process is divided into some stages to handle them in parallel, thereby shortening the processing time. In the case of FIG. 13, such stages include stages of DMA (Direct Memory Access) read, coarse motion search, fine motion search, predictive image creation, and DMA write. In this example, only primary parts involved in image processing are described, and there is no description about a variable codeword length coding, using VLC (Variable Length Coding) and the like. The stage of predictive image creation is herein arranged as shown in FIG. 14, for example. The predicted pixel buffer 1201 is a buffer for storing predicted pixels 102 of reference blocks 103-106. In the intra prediction step 1202, predicted pixels 102 are copied in a direction of prediction decided in the intra prediction mode select step 1207, whereby a predictive image is created. In the orthogonal transformation step 1203, an orthogonal transformation technique such as DCT (Discrete Cosine Transform) is used to transform a predictive image into orthogonal transformation coefficients. In the quantization step 1204, the orthogonal transformation coefficients are quantized to output quantized coefficients. In the inverse quantization step 1205, an inverse quantization is performed on the quantized coefficients output as a result of the quantization step 1204. In the inverse orthogonal transformation step 1206, an inverse orthogonal transformation is performed on inverse-quantized coefficients output as a result of the inverse quantization step 1205. After going through the orthogonal transformation step 1203, quantization step 1204, inverse quantization step 1205, and inverse orthogonal transformation step 1206, local decode images are created in all the predictable modes concerning the above-described sizes of intra 4×4, intra 8×8 and intra 16×16. In the intra prediction mode select step 1207, local decode images of the respective modes are compared thereby to select an intra prediction mode with the minimum prediction error. In the intra/inter prediction mode select step 1208, an intra predictive image created in the intra prediction step 1202 and an inter predictive image are compared thereby to output an image with a smaller prediction error as a predictive image.
The number of modes that can be predicted in the intra prediction is extremely numerous. Therefore, because of limitations of processing time, it is often difficult to execute, in series, the orthogonal transformation step 1203, quantization step 1204, inverse quantization step 1205, and inverse orthogonal transformation step 1206 for all the modes thereby to create local decode images. Hence, the processing time can be shortened by, e.g., arranging parallel circuits in groups of steps with no dependence therebetween, as shown by 1209-1212 of FIG. 14. However, the arrangement of such parallel circuits poses the problem of the increasing circuit size.
To prevent the increase in the circuit size, a method which includes moving the intra prediction mode select step larger in processing amount to another pipeline stage, and using an original image instead of a local decode image to perform the intra prediction mode select step has been proposed by Seiji Mochizuki, Tetsuya Shibayama, Masaru Hase, Fumitaka Izuhara, Kazushi Akie, Masaki Nobori, Ren Imaoka, Hiroshi Ueda, Kazuyuki Ishikawa, and Hiromi Watanabe, in “A Low Power and High Picture Quality H.264/MPEG-4 Video Codec IP for HD Mobile Applications”, IEEE Asian Solid-State Circuits Conference Proceedings, pp. 176-179, 2007. Also, a countermeasure such that the growth of the circuit size is suppressed by decreasing the number of used prediction modes can be taken.